<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>any-方法</title>
</head>
<body>
<script>
  // any-方法 只要有一个 Promise实例对象 成功(即状态为fulfilled),则整体结果就会是fulfilled
  //          如果所有的 promise实例对象 都失败 则返回的结果就是失败(rejected)

  let promise1=new Promise((resolve, reject) => {
    reject('err')
  })
  let promise2=new Promise((resolve, reject) => {
    resolve('success')
  })
  let promise3=new Promise((resolve, reject) => {
    reject('error')
  })

  let result=Promise.any([promise1,promise2,promise3])
  console.log(result)
</script>
</body>
</html>